# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-libnacl
_pkgname=libnacl
pkgver=1.7.1
pkgrel=0
pkgdesc="Python bindings for libsodium/tweetnacl"
url="https://libnacl.readthedocs.org/"
arch="noarch !armhf !armv7 !x86" # Tests fail on the builder but pass on CI
license="Apache-2.0"
makedepends="py3-setuptools libsodium-dev"
source="$_pkgname-$pkgver.tar.gz::https://github.com/saltstack/libnacl/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-libnacl" # Backwards compatibility
provides="py-libnacl=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest discover --start-directory tests -v
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="4beb6a5f30688ea72836512f771c566f2c0c03bbdeade4f4135b3068945a3b3e0da826f97a78f495887e852c36629ddb33e876696263404e74fac11e3b7bc9e9  libnacl-1.7.1.tar.gz"
